home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
database
/
do1beta
/
create.do
< prev
next >
Wrap
Text File
|
1991-07-24
|
702b
|
28 lines
/*
this is an example of how to create a .DBF file
the argument to "createDbf" is an array of arrays
of field defintions. each field definition array
contains a string that is the DBASE field name,
a character field type ('C' = char, 'N' = numeric, 'D' = date),
an integer length, and an integer number of decimals for numerics
*/
db = createDbf("test",[
["cfield",'C',32,0],
["nfield",'N',5,0],
["dfield",'D',0,0],
["mfield",'M',1024,0]]);
i = 1;
while(i < 10) {
nfield = i;
cfield = "test"+asString(i);
dfield = date();
mfield = "memo" + asString(i);
res = write(db,0L);
i = i+1;
}
? "table TEST.DBF created";
? "structure is ",structure(db);
close(db);